From: Philip Withnall Date: Fri, 5 May 2017 14:17:13 +0000 (+0100) Subject: libostree: Ensure progress keys are all always set X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~37^2~51 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=bf9772f2316a567566c20979e5247b2928287253;p=ostree.git libostree: Ensure progress keys are all always set If one of the progress keys is set in a pull operation, a ::changed signal is emitted on the progress object, and the callback for that could query any of the progress keys — so they all need to be set, otherwise we get an assertion failure in ostree_async_progress_get() due to a named key not existing. Spotted by Dan Nicholson in PR #819. Signed-off-by: Philip Withnall Closes: #835 Approved by: cgwalters --- diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 35598eca..12f93ab0 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -3477,6 +3477,9 @@ ostree_repo_pull_with_options (OstreeRepo *self, guint shift; GString *buf = g_string_new (""); + /* Ensure the rest of the progress keys are set appropriately. */ + update_progress (pull_data); + if (bytes_transferred < 1024) shift = 1; else